local nya__zhenlie = fk.CreateSkill {

  name = "nya__zhenlie",

  tags = {  },

}



nya__zhenlie:addEffect(fk.TargetConfirmed, {
  name = "nya__zhenlie",
  anim_type = "defensive",
  events = {fk.TargetConfirmed},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(nya__zhenlie.name) and (data.card:isCommonTrick() or data.card.trueName == "slash")
  end,
  on_cost = function(self, event, target, player, data)
    local prompt = "#nya__zhenlie-invoke"
    if not player:hasSkill("nya__play", true) then
      prompt = "#nya__zhenlie2-invoke"
    end
    return player.room:askForSkillInvoke(player, nya__zhenlie.name, nil, prompt.."::"..data.from..":"..data.card:toLogString())
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:loseHp(player, 1, nya__zhenlie.name)
    if player.dead then return end
    table.insertIfNeed(data.nullifiedTargets, player.id)
    local to = room:getPlayerById(data.from)
    if to.dead or to:isNude() then return end
    room:doIndicate(player.id, {data.from})
    local id = room:askForCardChosen(player, to, "he", nya__zhenlie.name)
    if not player:hasSkill("nya__play", true) then
      room:obtainCard(player, id, false, fk.ReasonPrey)
    else
      room:throwCard({id}, nya__zhenlie.name, to, player)
    end
  end,
})

return nya__zhenlie